import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Message from '@/components/Message'
import Shopcar from '@/components/Shopcar'
import My from '@/components/My'

import newslist from '@/components/news/newslist'
import newsinfo from '@/components/news/newsinfo'
import market from '@/components/supermarket/market'
import goodsinfo from '@/components/supermarket/goodsinfo'

Vue.use(Router)

export default new Router({
  routes: [
    //tabbar
    {
      path: '/home',
      component: Home
    },
    {
      path: '/message',
      component: Message
    },
    {
      path: '/shopcar',
      component: Shopcar
    },
    {
      path: '/my',
      component: My
    },
      //六宫格
    {
      path: '/newslist',
      component: newslist
    },
    {
      path: '/newslist/newsinfo/:aid',
      component: newsinfo
    },
    {
      path: '/home/market',
      component: market
    },
    //购物车
    {
      path: '/goodsinfo',
      component: goodsinfo
    },
    {
      path: '/',
      redirect : '/home'
    }
  ],
  linkActiveClass : 'mui-active'
})
